﻿module Sustainalytics.Screening {

    import Common = Sustainalytics.Common;
    import SearchBox = Sustainalytics.SearchBox;


    export interface IScreeningToolSearchBoxService {
        // Search for items given a term and paging options
        //Search(): ng.IHttpPromise<any[]>;
    }


    export class UniverseSearchBoxServiceAdapter implements IScreeningToolSearchBoxService {
        private _http: ng.IHttpService;
        public constructor(http) { this._http = http; }

        public Search(): ng.IHttpPromise<any[]> {
            var lstPromise: ng.IHttpPromise<any[]> = this._http.get("");
            return lstPromise;
        }
    }


    var mod = angular.module(screeningToolModuleName);

    mod.factory('UniverseSearchBoxServiceAdapter',($http: ng.IHttpService, $rootScope: ng.IScope) => {
        var adapter = new Sustainalytics.Screening.UniverseSearchBoxServiceAdapter($http);

        return adapter;
    });
}